﻿export namespace Constants {
    // 逻辑帧间隔(秒)
    export const LogicFrameInterval = 0.1;
    // 客户端卡顿容错
    export const ClientDelayCompensation = LogicFrameInterval * 3
    // 表现帧与逻辑帧的平衡值(表现帧使用)
    export function LPBalance(): number {
        return TimeUtil.deltatime() / LogicFrameInterval
    }

    // 对局最少角色数量(数值 <= Robot表长度小)
    export const FightingCharacterCount = 9
    // 可击球距离(基础值,会随着球每帧的移动单位增加)
    export const CanHitBallDistance = 250
    // 机器人击球判定距离(需小于可击球范围)(基础值,会随着球每帧的移动单位增加)
    export const RobotCanHitBallDistance = 100
    // 击球距离小于x值判定死亡(基础值,会随着球每帧的移动单位增加)
    export const HitBallFaultDistance = 5
    // 机器人击球成功率(1为100%击中)
    export const RobotHitBallSuccessRate = 0.8
    // 机器人攻击间隔CD(秒)
    export const RobotHitBallCD = 0.1
    // 空闲状态持续时间
    export const BoutLeisureStateSecond = 5
    // 报名阶段持续时间
    export const BoutPreparingStateSecond = 5
    // 球基础速度
    export const BallBasicSpeed = 25
    // 每次击打球的加速度
    export const BallStrikeAdditionSpeed = 5
    // 蓄力蓄满击球加速度
    export const GatherStrikeAdditionSpeed = 20
    // 击球加速度最大值
    export const BallStrikeAdditionMaxSpeed = 250
    // 机器人移动速度缩放(1为正常0为不动)
    export const RobotMoveSpeedScale = 0.8
    // 重置球到中心锁定移动秒数
    export const BladeBallResetPreparingSecond = 1
    // 攻击CD(= 蓄力motion时长 + x秒)
    export const AttackCD = 1.4
    // 击球冲量衰减
    export const HitBallImpulseAttenuation = 0.15
    // 蓄力判定比例(到达[0~1]区间内的多少比例算蓄力攻击)
    export const GatherAttackRate = 0.5
    // 击球瞬时加速度乘数
    export const HitTransienceImpulseMultiple = 30
    // 球距离目标多少距离击球方向冲量逐渐失效
    export const HitBallImpulseAttenuationByDistance = 400
    // 击球震屏幅度(不知道填多少先填100)
    export const ShakeScreenForce = 30
    // 抽奖界面单次填充显示个数
    export const LotteryWindowFillRewardCount = 7
    export const LotteryWindowRollSecond = 9
    // 对局击杀奖励money
    export const KillOtherCharacterRewardMoneyCount = 20
    // 冲刺技能CD
    export const SkillCD = 30
    // 引导球速
    export const GuideBallSpeedMultiple = 0.25
    // 获得金币buffID
    export const MoneyBuffCfgID = 100
    // 获得对局积分buffID
    export const BoutScoreBuffCfgID = 107
    // 保分卡ID
    export const ProtectScoreCardCfgID = 3001
    export const DanceCD = 0.5;

    export const HalfWidth = 75;

    export const MaxCameraArmLength = 1500;

    export const MinCameraArmLength = 100;
    
    // GamePass赛季
    export const GamePassCompetitionSeason = 1
    export const GamePassDailyMaxExp = 200

    // 机器人随机姓
    export const RobotFamilyNameArrayCN:string[] = [
        '欧阳',
        '诸葛',
        '夏侯',
        '端木',
        '东方',
        '南宫',
    ]

    // 音效枚举
    export enum SoundGuid{
        BGM="146107",
        BGM2="146100",
        BGM3="146103",
        OpenPanel = "199647",
        ClosePanel = "199680",
        /**界面内按钮音 */
        PanelBtn = "199827",
        /**蓄力 */
        Charge = "207599",
        Jump = "196560",
        LotteryAnimation = "207558",
        LotteryPanelOpen = "200257",
        GetItem = "137566",
        PlayerDie = "205651",
        Win = "204819",
        /**击球 */
        NormalAttack = "137559",
        HitBall = "126341",
        Tips = "199627",
    }
    export const BGMSoundGuidArray = [SoundGuid.BGM,SoundGuid.BGM2,SoundGuid.BGM3]
}
